import request from '@/utils/request'
/**
 * 预案列表
 */
export const allList = (params, page, size) => {
  console.log('params', params)
  return request({
    url: `/opermgt/planRegulate/search/${page}/${size}`,
    method: 'POST',
    data: params
  })
}
/**
 * 预案数据保存
 */
export const ListSave = (params) => {
  console.log('params', params)
  return request({
    url: '/opermgt/planRegulate',
    method: 'POST',
    data: params
  })
}
/**
 * 预案删除
 */
export const ListDelet = (id) => {
  return request({
    url: `/opermgt/planRegulate/${id}`,
    method: 'DELETE'
  })
}
/**
 * 单个预案
 */
export const ListId = (id) => {
  return request({
    url: `/opermgt/planRegulate/${id}`,
    method: 'GET',
  })
}
/**
 * 预案类型
 */
export const ListType = () => {
  return request({
    url: '/opermgt/planRegulate/selectType',
    method: 'GET',
  })
}
/**
 * 知识库列表
 */
export const ListKnowledge = (params) => {
  return request({
    url: '/opermgt/file/knowledgeBase/queryList',
    method: 'POST',
    data: params
  })
}
/**
 * 知识库保存
 */
export const ListKnowledgeSave = (params) => {
  return request({
    url: '/opermgt/file/knowledgeBase',
    method: 'POST',
    data: params
  })
}
/**
 * 知识库删除
 */
export const ListKnowledgeDelet = (id) => {
  return request({
    url: `/opermgt/file/delete/${id}`,
    method: 'POST'
  })
}
/**
 * 知识库类型
 */
export const getKonewType = () => {
  return request({
    url: '/opermgt/file/queryDocType',
    method: 'POST',
  })
}
